home *** CD-ROM | disk | FTP | other *** search
/ 17 Bit Software 5: The Fifth Dimension / 17 Bit - The Fifth Dimension (1995)(17 Bit Software)[!].iso / files / 3581.dms / 3581.adf / ControlPanel / Bin / SpotNewsGroups < prev    next >
Text File  |  1995-02-01  |  1KB  |  36 lines

  1. /* Rexx Script To Add Newsgroups To Spot Setup */
  2.  
  3. if ~open(initial, "env:NGA") then call firsttime()
  4. address command "copy mail:spot.areas.def mail:spot.areas"
  5. address command "copy amigate:amigate.areas.def amigate:amigate.areas"
  6. call open(newsgroups, "uulib:newsgroups", r)
  7. call open(gateareas, "amigate:amigate.areas", a)
  8. call open(spotareas, "uumail:spot.areas", a)
  9. call seek(gateareas, 0, "E")
  10. call seek(spotareas, 0, "E")
  11.  
  12. do until EOF(newsgroups)
  13.    NewsLine = readln(newsgroups)
  14.    NewsGroup = word(newsline,1)
  15.    NewsDays = word(newsline,2)
  16.    if newsline ~== "" then do
  17.      amigate = "AREA + " || newsgroup || " " || newsgroup
  18.      spot = "AREA """ || newsgroup || """ 2:999/99.9 " || newsgroup || " origgroup -1 orig -1 REPLY 1 SIG 0 TAGLINES 0 KEEP " || Newsdays || " KEEPDAYS USENET"
  19.      call writeln(gateareas, amigate)
  20.      call writeln(spotareas, spot)
  21.    end
  22. end
  23. call close(newsgroups)
  24. call close(gateareas)
  25. call close(spotareas)
  26.  
  27. exit
  28.  
  29. firsttime:
  30. address command "Copy mail:spot.areas mail:spot.areas.def"
  31. address command "Copy amigate:amigate.areas amigate:amigate.areas.def"
  32. address command "Echo yes > envarc:nga"
  33. address command "Echo Yes > env:nga"
  34. return
  35.  
  36.